home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nibble Magazine
/
nib18.dsk
/
QUICKSORT II DEMO1.bas
< prev
next >
Wrap
BASIC Source File
|
2023-02-26
|
858b
|
27 lines
1 REM ***********************
2 REM * QUICKSORT II DEMO1 *
3 REM * BY CORNELIS BONGERS *
4 REM * COPYRIGHT (C) 1984 *
5 REM * BY MICROSPARC, INC. *
6 REM * LINCOLN, MA. 01773 *
7 REM ***********************
8 TEXT : HOME : VTAB 3: PRINT "** COPYRIGHT 1983 BY MICROSPARC, INC. **": PRINT
9 IF PEEK(1015) < >140 THEN PRINT CHR$(4);"BRUN QUICKSORT II"
10 LET A = RND( -1): REM SEED RANDOM GENERATOR
20 LET B = 5:N1 = 3:N2 = 5: REM CONSTANTS
30 DIM A%(10,10)
40 FOR I = 0 TO 10: FOR J = 0 TO 10
50 LET A%(I,J) = 5 * RND(1)
60 NEXT : NEXT
1000 PRINT "ROW/COL";
1010 FOR J = 0 TO 10
1020 PRINT TAB( 9 +J *3);J;
1030 NEXT
1040 PRINT : PRINT
1050 FOR I = 0 TO 10: FOR J = 0 TO 10
1060 FOR I = 0 TO 10
1070 PRINT I; TAB( 9);
1080 FOR J = 0 TO 10
1090 PRINT TAB( 9 +J *3);A%(I,J);
1100 NEXT J: PRINT : NEXT I
1110 END